package com.ebanma.cloud.usertestall.domain.common;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * @author: <a href="liuhe41@faw.com.cn">刘赫</a>
 * @date: 2023/3/16
 * @time: 17:19
 * @description:
 */
public class PageQuery<T> implements Serializable {


    /**
     * 串行版本uid
     */
    private static final long serialVersionUID = -2911529541354059078L;
    /**
     * 当前页
     */
    @Min(value = 1, message = "页号必须为正整数！")
    private Integer pageNo = 1;
    /**
     * 每页条数
     */
    @Max(value = 100, message = "每页条数不能超过100条！")
    private Integer pageSize = 20;
    /**
     * 动态查询条件
     */
    private T query;


    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public T getQuery() {
        return query;
    }

    public void setQuery(T query) {
        this.query = query;
    }
}
